package com.xiaoshu.controller;

import com.xiaoshu.aop.LevelRecordAnnotation;
import com.xiaoshu.common.Result;
import com.xiaoshu.common.ResultGenerator;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * 功能说明：
 * com.xiaoshu.controller
 *
 * <p>
 * Original @Author: deane.jia-贾亮亮,2021/6/15 14:40
 * <p>
 * Copyright (C)2012-2021 小树盛凯科技 All rights reserved.
 */
@RestController
@RequestMapping(value = "/commit")
@Slf4j
@Api(value = "评论管理")
public class CommentServerController {

    @PostMapping(value = "/info")
    @ApiOperation(value = "评论文章")
    @LevelRecordAnnotation(value = "CommentArticle")
    public Result CommentArticle(@RequestParam(value = "userId") String userId, @RequestParam int articleId){
        log.info("[CommentArticle] Comment userId :{}, article id :{}", userId, articleId);
        return ResultGenerator.success();
    }
}
